#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void shell_sort(int arr[], int len) {
    int gap, i, j;
    int temp;
    for (gap = len >> 1; gap > 0; gap = gap >> 1)
        for (i = gap; i < len; i++) {
            temp = arr[i];
            for (j = i - gap; j >= 0 && arr[j] > temp; j -= gap)
                arr[j + gap] = arr[j];
            arr[j + gap] = temp;
        }
}
int main(int argc,char const *argv[]){
	int a[10];
    int len = sizeof(a)/sizeof(a[0]);
    for(int i=0;i<len;i++){
    	scanf("%d",&a[i]);
	}
	shell_sort(a,len);
	for(int i=0;i<len;i++){
		printf("%d ",a[i]);
	}
	return 0;
}
